from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'camperalyon.views.home', name='home'),
    # url(r'^camperalyon/', include('camperalyon.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # urls principaux vers les urls secondaires de chaque appli
    url(r'^admin/', include(admin.site.urls)),
    url(r'^lieu/', include('lieu.urls')),
    url(r'^contact/', include('contact.urls'))
)

# urlpatterns += staticfiles_urlpatterns()

# #Necessaire pour le CSS
# # Pb comment faire en production ?
# if settings.DEBUG:
#     urlpatterns += patterns('',
#         (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATICFILES_DIRS}),
#     )

  # urlpatterns += patterns('',
  #       (r'^static/(?P<path>.*)$', 'django.views.static.serve',
  #           {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),